package com.ruoyi.common.core.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;
import java.io.Serializable;
import java.util.Date;
import java.util.Map;

/**
 * Entity基类
 *
 * @author mwj
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class BaseWmsEntity  extends Model<BaseWmsEntity> implements Serializable {
    private static final long serialVersionUID = 1L;
    /** 搜索值 */
    @JsonIgnore
    @TableField(exist = false)
    private String searchValue;

    /** 请求参数 */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @TableField(exist = false)
    private Map<String, Object> params;
    /** 备注 */
    @TableField(value = "REMARK",jdbcType = JdbcType.VARCHAR,fill = FieldFill.INSERT)
    private String remark;

    /** 创建者 */
    @TableField(value = "CREATE_BY",jdbcType = JdbcType.VARCHAR,fill = FieldFill.INSERT)
    private String createBy;

    /** 创建时间 */
    @TableField(value = "CREATE_TIME",jdbcType =JdbcType.TIMESTAMP, fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/ShangHai")
    private Date createTime;

    /** 更新者 */
    @TableField(value = "UPDATE_BY",jdbcType = JdbcType.VARCHAR, fill = FieldFill.INSERT_UPDATE)
    private String updateBy;

    /** 更新时间 */
    @TableField(value = "UPDATE_TIME",jdbcType =JdbcType.TIMESTAMP, fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/ShangHai")
    private Date updateTime;
}
